package com.yh.workbill.ui.companyInfo;

import com.yh.workbill.App;
import com.yh.workbill.db.Company;
import com.yh.workbill.db.CompanyDao;

import java.util.List;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;

public class CompanyInfoRepository {

    private CompanyDao dao;
    public LiveData<List<Company>> data;

    public CompanyInfoRepository() {
        dao = App.appDataBase.getCompanyDao();
        this.data = dao.getComanys();
    }

    public void del(Company company) {
        dao.delect(company);
    }

    public void add(Company company) {
        dao.add(company);
    }
}
